﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdatePassword.aspx.cs" Inherits="WeChat.UserInfo.UpdatePassword" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
     <script src="../bootstrap-3.3.5-dist/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <%--<link href="bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript"></script>--%>

    <link href="css/weui.css" rel="stylesheet" />
    <%--<link href="css/bindstyle.css" rel="stylesheet" type="text/css" />--%>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>  
       <script type="text/javascript">
          
           function check() {
               if ($("#ypassword").val() == "" || $("#xpassword").val() == "" || $("#qpassword").val() == "") {
                   $("#notice").text("请输入完整原始密码及新密码");
                   return false;
               } else {
                   var reg = /^(?=.*[0-9])(?=.*[a-zA-Z])[0-9a-zA-Z]{8,30}$/;
                   var regs = /^[\u0391-\uFFE5]+$/; //判断输入的字符是否为中文
                  
                   //if (!reg.test($("[type='password']").val())) {
                   //    $("#notice").text("密码修改必须包含数字和字母！");
                   //    return false;
                   //} 

                    if (!reg.test($("#xpassword").val())) {
                        $("#notice").text("密码修改必须包含数字和字母！");
                       return false;
                   } 
                    if (!reg.test($("#qpassword").val())) {
                        $("#notice").text("密码修改必须包含数字和字母！");
                       return false;
                   } 

               }
           }
           function clean() {
               $("#notice").text("");
           }
       </script>
<style>
.top {
	background-color: #fafafa;
	border-bottom: 1px solid #c8c8c8;
	height: 44px;
	line-height: 44px;
	position: relative;
	margin-bottom: 10px;
}
.top h1 {
	color: #333;
	font-size: 18px;
	font-weight: 400;
	text-align: center;
	text-shadow: 0 1px 1px #fff;
	white-space: nowrap;
}
</style>
</head>
<body>
    <div class="top">
            <h1><span>修改密码</span></h1>
        </div>
       <%-- <div><asp:Label ID="notes" runat="server" Text="您还未绑定账号，请先绑定账号：" ForeColor="BlueViolet"></asp:Label></div>--%>
       <form id="slicklogin" runat="server">
        
        <%--<div runat="server" id="panel1">
            <p id="notice" runat="server" style="color: Red"></p>
            <label for="cardid">cardid</label><input type="text" id="cardid" name="cardid" class="placeholder" placeholder="卡号" onclick="clean()" maxlength="10" />
            <label for="username">username</label><input type="text" id="name" name="name" class="placeholder" placeholder="用户名" onclick="clean()" maxlength="10"/>
            <label for="password">password</label><input type="password" id="password" name="password" class="placeholder" placeholder="密码" onclick="clean()" maxlength="16"/>
            <asp:Button ID="bt1" runat="server" Text="点此绑定" OnClientClick="return check()" OnClick="binding" />
        </div>--%>
        <div runat="server" id="panel1">
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">卡号</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input id="cardid" name="cardid" class="weui_input" type="text" placeholder="请输入卡号" readonly="readonly" onclick="clean()" maxlength="10" value="<%=rfkh%>"/>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">原密码</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input id="ypassword" name="ypassword" class="weui_input" type="password" placeholder="请输入原密码" onclick="clean()" maxlength="16"/>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">新密码</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input id="xpassword" name="xpassword" class="weui_input" type="password" placeholder="请输入新密码" onclick="clean()" maxlength="16"/>
                </div>
            </div>
            <div class="weui_cell">
               <%-- <div class="weui_cell_hd"><label class="weui_label">再次确认</label></div>--%>
                 <div class="weui_cell_hd">再次确认</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input id="qpassword" name="qpassword" class="weui_input" type="password" placeholder="请再次确认新密码" onclick="clean()" maxlength="16"/>
                </div>
             
            </div>
        </div>
        <div class="weui_cells_tips"><span id="notice" runat="server" style="color:Red; font-size:medium"></span></div>
        <div class="weui_btn_area">
            <asp:Button ID="bt1" runat="server" Text="确认修改" OnClientClick="return check()"  CssClass="weui_btn weui_btn_primary" OnClick="bt1_Click" />
           <%-- <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips">确定</a>--%>
        </div>
        </div>
      
    </form>
   <div class="weui_msg" id="success" runat="server" visible="false">
        <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
        <div class="weui_text_area">
            <h2 class="weui_msg_title">修改密码成功！</h2>
        </div>
        <div class="weui_opr_area">
            <p class="weui_btn_area">
                <a href="UserInfo/PersonalInfo.aspx" class="weui_btn weui_btn_primary">确 定</a>
            </p>
        </div>
    </div>
</body>
</html>
